macro .ANONYMOUS_GLOBAL_LABEL
{
	local a
	a:
}

macro .BLOCK_BEGIN
{
	local ..a, ..b
	BLOCK_BEGIN equ ..a
	BLOCK_END   equ ..b
	BLOCK_BEGIN:
}

macro .BLOCK_END
{
	BLOCK_END:
	restore BLOCK_BEGIN
	restore BLOCK_END
}

macro .SUBROUTINES l
{
  l:
  macro .ADDR s
  \{
    dd l#.\#s
  \}
  macro .CALL s
  \{
    call l#.\#s
  \}
  macro .CALLI s, i
  \{
    call dword [l#.\#s+4*i]
  \}
  macro .ENDF s
  \{
    restore l
  \}
  macro .FUNC s
  \{
    l equ l#.\#s
    l:
  \}
  macro .JMP s
  \{
    jmp l#.\#s
  \}
  macro .JMPI s, i
  \{
    jmp dword [l#.\#s+4*i]
  \}
  macro .LABEL s
  \{
    l#.\#s:
  \}
  macro .MOV a, s
  \{
    mov a, l#.\#s
  \}
  macro .STDCALL s, [a]
  \{
    \common
    stdcall l#.\#s, a
  \}
}

macro .END_SUBROUTINES
{
  purge .ADDR
  purge .CALL
  purge .CALLI
  purge .ENDF
  purge .FUNC
  purge .JMP
  purge .JMPI
  purge .MOV
  purge .LABEL
  purge .STDCALL
}